home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 376-400 / disk_390 / setclock / include / ports.i < prev    next >
Text File  |  1992-05-06  |  2KB  |  75 lines

  1. {
  2.         These are the things you'll need in order to use Exec messages.
  3.         You will not need to include Exec.i before this.
  4. }
  5.  
  6. type
  7.  
  8.     NodeType = (NTUnknown, NTTask, NTInterrupt, NTDevice, NTMsgPort,
  9.                 NTMessage, NTFreeMsg, NTReplyMsg, NTResource, NTLibrary,
  10.                 NTMemory, NTSoftInt, NTFont, NTProcess, NTSemaphore);
  11.  
  12.     Node = record
  13.         lnSucc : ^Node;
  14.         lnPred : ^Node;
  15.         lnType : NodeType;   { original error was 'Byte' }
  16.         lnPri  : Byte;
  17.         lnName : String;
  18.     end;
  19.     NodePtr = ^Node;
  20.  
  21.     MinNode = Record
  22.         mln_Succ,
  23.         mln_Pred : ^MinNode;
  24.     end;
  25.     MinNodePtr = ^MinNode;
  26.  
  27.     List = record
  28.         lhHead,
  29.         lhTail,
  30.         lhTailPred : NodePtr;
  31.         lhType,
  32.         lPad    : Byte;
  33.     end;
  34.     ListPtr = ^List;
  35.  
  36.     MinList = Record
  37.         mlh_Head,
  38.         mlh_Tail,
  39.         mlh_TailPred : MinNodePtr;
  40.     end;
  41.     MinListPtr = ^MinList;
  42.  
  43.     MsgType = (PASignal, PASoftInt, PAIgnore, PFAction);
  44.  
  45.     MsgPort = record
  46.         mpNode    : Node;
  47.         mpFlags,
  48.         mpSigBit  : Byte;
  49.         mpSigTask : Address;
  50.         mpMsgList : List;
  51.     end;
  52.     MsgPortPtr = ^MsgPort;
  53.  
  54.     Message = record
  55.         mnNode          : Node;
  56.         mnReplyPort     : MsgPortPtr;
  57.         mnLength        : Short;
  58.     end;
  59.     MessagePtr = ^Message;
  60.  
  61. Procedure AddPort(p : MsgPortPtr);
  62.     External;
  63. Function FindPort(n : String): MsgPortPtr;
  64.     External;
  65. Function GetMsg(p : MsgPortPtr): MessagePtr;
  66.     External;
  67. Procedure PutMsg(p : MsgPortPtr; m : MessagePtr);
  68.     External;
  69. Procedure RemPort(m : MsgPortPtr);
  70.     External;
  71. Procedure ReplyMsg(m : MessagePtr);
  72.     External;
  73. Function WaitPort(p : MsgPortPtr): MessagePtr;
  74.     External;
  75.